<?php

class Application_Resource_Routes extends Zend_Application_Resource_ResourceAbstract
{
    public function init()
    {
        $router = $this->getBootstrap()->bootstrap('FrontController')
                       ->getResource('FrontController')->getRouter();

        $router->removeDefaultRoutes();

        $router->addConfig(new Zend_Config_Ini(
            APPLICATION_PATH . '/configs/routes.ini',
            APPLICATION_ENV
        ));

        return $router;
    }
}